package com.nineclock.system.controller;

import com.nineclock.common.entity.Result;
import com.nineclock.system.api.OrganizationControllerApi;
import com.nineclock.system.pojo.SysCompanyUser;
import com.nineclock.system.service.SysCompanyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/organization")
public class OrganizationController implements OrganizationControllerApi {

    @Autowired
    private SysCompanyUserService sysCompanyUserService;

    @Override
    @GetMapping("/members/simple")
    public Result<List<SysCompanyUser>> findAllUser() {
        List companyUserList = sysCompanyUserService.findAllUser();
        return Result.success(companyUserList);
    }
}
